package ui;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.JPanel;

import logic.ACListUser;

public class UserUI extends JPanel {
	ui.GlobalLogoutPanel globallogoutpanel;
	logic.ACListUser ac;

	/**
	 * Create the panel.
	 */
	public UserUI(GlobalLogoutPanel globallogoutpanel) {
		
		this.globallogoutpanel = globallogoutpanel;
		
		setBackground(Color.decode("#3a3a3a"));
		setSize(GlobalScreen.SIZE);
		setLayout(new BorderLayout(0,0));

		// Instantiates Components
		
		UserPanel userPanel = new UserPanel(this);
		UserCenterPanel usercenterPanel = new UserCenterPanel();
		

		
		ac = new ACListUser(userPanel,this, usercenterPanel);
		userPanel.addACList(ac);
		usercenterPanel.addACList(ac);
	


		
		
		
		// Dimensions
		
		

		// SWITCHING BETWEEN DASHBOARD AND OTHER LAYOUTS HERE:

		// Adding Components
		
		add(userPanel, BorderLayout.LINE_START);
		add(usercenterPanel,BorderLayout.CENTER);
		
		
		
	
		

		// Setting visibility
		

	}
	public void addLogoutPanel(){
		add(globallogoutpanel, BorderLayout.SOUTH);
	}
	public logic.ACListUser getAc() {
		return ac;
	}
	public void setAc(logic.ACListUser ac) {
		this.ac = ac;
	}

}
